/* Mock数据，表示自己设置的数据 */
//数据多样，用json方式
const _product = [{
    id: 1,
    title: "保时捷",
    price: "999999",
    inventory: 5 //库存

}, {
    id: 2,
    title: "法拉利",
    price: "8888888",
    inventory: 4 //库存

}, {
    id: 3,
    title: "路虎",
    price: "2000000",
    inventory: 6 //库存

}, {
    id: 4,
    title: "玛莎拉蒂",
    price: "99747398",
    inventory: 1 //库存

}, {
    id: 5,
    title: "劳斯莱斯",
    price: "99876999",
    inventory: 3 //库存

}, ]

// function getProducts(){
// 异步请求
// return _product;
// }

const getProducts = (params) => {
    //异步请求
    return _product
}
export {
    getProducts //将这个函数输出，不然外面调用不到
}